/*

#include "Acceptor.h"

template <class SERVICE_HANDLER>
Acceptor<SERVICE_HANDLER>::Acceptor(const InetAddress &localAddr, Reactor * reactor)
  : reactor_(reactor)
{
  peerAcceptor_.open (localAddr);
  reactor_->registerHandler(this, ACCEPT_EVENT);
}

template <class SERVICE_HANDLER>
void Acceptor<SERVICE_HANDLER>::accept()
{
  SERVICE_HANDLER *serviceHandler = makeServiceHandler();
  acceptServiceHandler(serviceHandler);
  activateServiceHandler(serviceHandler);
}

template <class SERVICE_HANDLER>
SERVICE_HANDLER *Acceptor<SERVICE_HANDLER>::makeServiceHandler()
{
  return new SERVICE_HANDLER(reactor_);
}

template <class SERVICE_HANDLER>
void Acceptor<SERVICE_HANDLER>::acceptServiceHandler(SERVICE_HANDLER *sh)
{
  peerAcceptor_.accept(sh->peer());
}


template <class SERVICE_HANDLER>
void Acceptor<SERVICE_HANDLER>::activateServiceHandler(SERVICE_HANDLER *sh)
{
  // skal vi setHanlde??
  sh->open();
}

template <class SERVICE_HANDLER>
void Acceptor<SERVICE_HANDLER>::handleEvent(Handle h, EventType et)
{
  if (et == ACCEPT_EVENT)
    accept();
}

template <class SERVICE_HANDLER>
Handle Acceptor<SERVICE_HANDLER>::getHandle() const
{
  return peerAcceptor_.getHandle();
}


*/
